const mongoose = require("mongoose");

const options = {
  db_user: "lihesen", //添加的普通账户名
  db_pwd: "lihesen",
  db_host: "127.0.0.1",
  db_port: 27017,
  db_name: "userInfo", //数据库名称
  useNewUrlParser: true,
};
let dbURL = "mongodb://" + options.db_user + ":" + options.db_pwd + "@" + options.db_host + ":" + options.db_port + "/" + options.db_name;
mongoose.connect(dbURL,(err)=>{
    if(err) throw err;
    console.log("数据库连接成功")
});// 连接数据库
